<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
    <!-- <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script> -->
</head>
<body>
    
    
    <div id="showpic"></div>

    <div id="myform">
     <form action="http://localhost:3008/upload" method="post" enctype="multipart/form-data" target="upframe">
      <input type="file" name="file" id="mypic"/><br />
      <br />
      <input type="submit" name="submit" value=" 上传 " onclick="check()"/>
     </form>
    </div>

    <iframe id="upframe" name="upframe" src="" style="display:none;">
    </iframe>

    <script type="text/javascript">   
        function show(image){
               var node = document.getElementById("showpic");
        // 显示图片在showpic层中
               node.innerHTML ='<img src="/thinkphp_ajax/images/test/'+image+'">';
        
           }
            </script>
    
</body>
</html>